/**
 * Created by MetaLab_Gu on 2016/4/21.
 */
angular.module('metalabPartnerApp').filter('stateJudgment', [function () {
    return function (state, min, max) {
        var states = {
            '已取消': -1,
            '正在审核': 0,
            '联系沟通': 1,
            '邀请对接': 2,
            '线下对接': 3,
            '提交合同': 4,
            '确认签约': 5,
            '已完成': 6,
        };
        return min ? (states[state] >= states[min]) && (max ? states[state] <= states[max] : true) : (max ? states[state] <= states[max] : states[state]);
    }
}]);
